/// model : "deepseek-v2:latest"
/// created_at : "2025-02-13T03:22:50.086134Z"
/// response : " 首先，我们需要确定一个苹果的价格。题目告诉我们一个苹果是2块钱。\n\n然后，我们计算购买20个苹果需要的金额。由于一个苹果的价格是2块钱，所以20个苹果的价格就是20乘以每个苹果的价格。\n\n用数学公式表示就是：20 * 2 = 40元。\n\n所以，20个苹果需要40元。"
/// done : true
/// done_reason : "stop"
/// context : [5726,25,207,16,798,17084,17,38035,19304,17,15,798,17084,59472,2224,185,185,77398,25,207,11763,19304,63298,13196,1615,17084,27392,398,43782,59065,1615,17084,504,17,38035,398,185,185,7752,19304,1818,13792,12469,17,15,798,17084,43444,25178,398,7406,1615,17084,27392,504,17,38035,19304,3705,17,15,798,17084,27392,2399,17,15,11368,851,13712,17084,27392,398,185,185,1082,27593,76608,6365,2399,45326,17,15,575,207,17,403,207,19,15,2359,398,185,185,3705,19304,17,15,798,17084,4012,19,15,2359,398]
/// total_duration : 1224671792
/// load_duration : 17400667
/// prompt_eval_count : 20
/// prompt_eval_duration : 251000000
/// eval_count : 87
/// eval_duration : 954000000

class ResponseDto {
  ResponseDto({
      String? model, 
      String? createdAt, 
      String? response, 
      bool? done, 
      String? doneReason, 
      List<num>? context, 
      num? totalDuration, 
      num? loadDuration, 
      num? promptEvalCount, 
      num? promptEvalDuration, 
      num? evalCount, 
      num? evalDuration,}){
    _model = model;
    _createdAt = createdAt;
    _response = response;
    _done = done;
    _doneReason = doneReason;
    _context = context;
    _totalDuration = totalDuration;
    _loadDuration = loadDuration;
    _promptEvalCount = promptEvalCount;
    _promptEvalDuration = promptEvalDuration;
    _evalCount = evalCount;
    _evalDuration = evalDuration;
}

  ResponseDto.fromJson(dynamic json) {
    _model = json['model'];
    _createdAt = json['created_at'];
    _response = json['response'];
    _done = json['done'];
    _doneReason = json['done_reason'];
    _context = json['context'] != null ? json['context'].cast<num>() : [];
    _totalDuration = json['total_duration'];
    _loadDuration = json['load_duration'];
    _promptEvalCount = json['prompt_eval_count'];
    _promptEvalDuration = json['prompt_eval_duration'];
    _evalCount = json['eval_count'];
    _evalDuration = json['eval_duration'];
  }
  String? _model;
  String? _createdAt;
  String? _response;
  bool? _done;
  String? _doneReason;
  List<num>? _context;
  num? _totalDuration;
  num? _loadDuration;
  num? _promptEvalCount;
  num? _promptEvalDuration;
  num? _evalCount;
  num? _evalDuration;
ResponseDto copyWith({  String? model,
  String? createdAt,
  String? response,
  bool? done,
  String? doneReason,
  List<num>? context,
  num? totalDuration,
  num? loadDuration,
  num? promptEvalCount,
  num? promptEvalDuration,
  num? evalCount,
  num? evalDuration,
}) => ResponseDto(  model: model ?? _model,
  createdAt: createdAt ?? _createdAt,
  response: response ?? _response,
  done: done ?? _done,
  doneReason: doneReason ?? _doneReason,
  context: context ?? _context,
  totalDuration: totalDuration ?? _totalDuration,
  loadDuration: loadDuration ?? _loadDuration,
  promptEvalCount: promptEvalCount ?? _promptEvalCount,
  promptEvalDuration: promptEvalDuration ?? _promptEvalDuration,
  evalCount: evalCount ?? _evalCount,
  evalDuration: evalDuration ?? _evalDuration,
);
  String? get model => _model;
  String? get createdAt => _createdAt;
  String? get response => _response;
  bool? get done => _done;
  String? get doneReason => _doneReason;
  List<num>? get context => _context;
  num? get totalDuration => _totalDuration;
  num? get loadDuration => _loadDuration;
  num? get promptEvalCount => _promptEvalCount;
  num? get promptEvalDuration => _promptEvalDuration;
  num? get evalCount => _evalCount;
  num? get evalDuration => _evalDuration;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['model'] = _model;
    map['created_at'] = _createdAt;
    map['response'] = _response;
    map['done'] = _done;
    map['done_reason'] = _doneReason;
    map['context'] = _context;
    map['total_duration'] = _totalDuration;
    map['load_duration'] = _loadDuration;
    map['prompt_eval_count'] = _promptEvalCount;
    map['prompt_eval_duration'] = _promptEvalDuration;
    map['eval_count'] = _evalCount;
    map['eval_duration'] = _evalDuration;
    return map;
  }

}